package com.ryan.spring.annotation.ext;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * Created by kaimin on 17/2/2019.
 * time : 22:39
 */
@Service
public class UserService {

    @EventListener(
            classes = {ApplicationEvent.class}
    )
    public void listner(ApplicationEvent event){
        System.out.println("注解事件是："+event);
    }
}
